package com.ahwei.product.entity;

import com.ahwei.common.mybatis.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * <p>
 *
 * </p>
 *
 * @author ahwei
 * @since 2022-05-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("shop_product")
public class Product extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 商品价格
     */
    private BigDecimal price;

    /**
     * 库存数量
     */
    private Integer stock;

    /**
     * 是否删除（0-正常，1-删除）
     */
    @TableField("is_deleted")
    @TableLogic
    private Boolean deleted;
}
